﻿#include "mylabel.h"

myLabel::myLabel(QWidget *parent):QLabel(parent)
{

}

void myLabel::mousePressEvent(QMouseEvent *event)
{
    if(labelType==EXIT)
    {
        tuichu();
    }
    if(labelType==SWITCH)
    {
        qiehuan();
    }
    if(labelType==SERCHER)
    {
        find();
    }
}

void myLabel::setType(int n)
{
    if(n==0)
        labelType=EXIT;
    else if(n==1)
        labelType=SWITCH;
    else if(n==2)
        labelType=SERCHER;
}
